package com.rabbitmq;

//import com.rabbitmq.direct.producer.Procuder;
//import com.rabbitmq.topic.producer.ProducerTopic;
//import com.rabbitmq.fanout.producer.Procuder;
import com.rabbitmq.delay.producer.LazySender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class RabbitmqApplication {

//	@Autowired
//	private Procuder procuder;

//	@Autowired
//	private Procuder procuder;
//
//	@Autowired
//	private ProducerTopic producerTopic;

	@Autowired
	private LazySender lazySender;

	public static void main(String[] args) {
		SpringApplication.run(RabbitmqApplication.class, args);
	}

//	@RequestMapping("sendQueueP2p/{msg}")
//	public void sendQueueP2p(@PathVariable("msg") String msg){
//		procuder.send(msg);
//	}

//	@RequestMapping("sendA/{msg}")
//	public void sendA(@PathVariable("msg") String msg){
//		procuder.sendA(msg);
//	}
//
//	@RequestMapping("send/{msg}")
//	public void sendQueueFanoutA(@PathVariable("msg") String msg){
//		procuder.send(msg);
//	}
//
//	@RequestMapping("sendTopic")
//	public void sendTopic(){
//		producerTopic.sendTopic();
//	}
//
//	@RequestMapping("sendAll")
//	public void sendAll(){
//		producerTopic.sendAll();
//	}
//
//	@RequestMapping("message")
//	public void message(){
//		producerTopic.message();
//	}
//
//	@RequestMapping("message2")
//	public void message2(){
//		producerTopic.message2();
//	}
//
//	@RequestMapping("messages")
//	public void messages(){
//		producerTopic.messages();
//	}


	@RequestMapping("sendlazy/{msg}")
	public void sendlazy(@PathVariable("msg") String msg){
		lazySender.sendlazy(msg);
	}
}
